package gagnatech.manager;


import gagnatech.dao.UserDAO;
import gagnatech.entity.User;
import gagnatech.impl.UserDaoImpl;

public class ManagerUser {

	private UserDAO userDAO;

	public ManagerUser() {
		userDAO = new UserDaoImpl();
	}

	public ManagerUser(UserDAO userDAO) {
		this.userDAO = userDAO;
	}
	
	public User connect(String login, String mdp) {
		return userDAO.connect(login, mdp);
	}

	public boolean addUser(User user) {
		return userDAO.addUser(user);
	}

	public UserDAO getUserDAO() {
		return userDAO;
	}

	public void setUserDAO(UserDAO userDAO) {
		this.userDAO = userDAO;
	}

	@Override
	public String toString() {
		return "ManagerUser [userDAO=" + userDAO + "]";
	}
	
	
}
